package cn.com.lyb.flink.udf;

import cn.com.lyb.flink.bean.WaterSensor;
import org.apache.flink.api.common.functions.FilterFunction;

public class FilterFunctionDemo implements FilterFunction<WaterSensor> {

    private String id;

    public FilterFunctionDemo(String id) {
        this.id = id;
    }

    @Override
    public boolean filter(WaterSensor value) throws Exception {
        return id.equals(value.getId());
    }
}
